#!/bin/sh
# $Id: prerm 193 2008-08-01 17:45:28Z sundell $
# post remove script for the Debian GNU/Linux slack package

set -e

if [ "$1" = "purge" -o "$1" = "remove" ]; then
    # We hope, here, that you have not set CACHE or STAGE to something stupid
    # in slack.conf.  Just in case they are in the environment for some other
    # reason, unset them.
    unset CACHE
    unset STAGE
    . /etc/slack.conf
    # purge the cache
    if [ -n "$CACHE" ] ; then
        rm -rf "$CACHE"/*
    fi
    # remove the stage
    if [ -n "$STAGE" ] ; then
        rm -rf "$STAGE"
    fi
fi

#DEBHELPER#

exit 0
